package cn.lzd.mr.case8;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * Created by lzd on 2018/8/16.
 */
public class Main3 {
    static int res = 0;

    public static void main(String[] args) {
        try {
            List<String> list = FileUtils.readLines(new File("C:\\Users\\lzd\\Desktop\\111.txt"));
            list.stream().forEach((x) -> {
                String[] split = x.toString().split("\\s+");
                Integer integer = Integer.valueOf(split[2]);
                System.out.println(integer);
                res += integer;
            });

        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(res);
    }
}
